using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.QualityManage
{
    /// <summary>
    /// 质检工单附件（与质检工单一对多）
    /// </summary>
    [Table("QualityOrderAttachment")]
    public class QualityOrderAttachment : BaseEntity
    {
        /// <summary>
        /// 质检工单Id
        /// </summary>
        public long QualityOrderId { get; set; }

        /// <summary>
        /// 原始文件名 
        /// </summary>
        public string? FileName { get; set; }

        /// <summary>
        /// 文件访问地址（或相对路径）
        /// </summary>
        public string? FileUrl { get; set; }

        /// <summary>
        /// 文件大小（字节）
        /// </summary>
        public long? FileSize { get; set; }

        /// <summary>
        /// 文件类型（MIME）
        /// </summary>
        public string? ContentType { get; set; }

        /// <summary>
        /// 文件哈希（MD5/SHA1）
        /// </summary>
        public string? FileHash { get; set; }

        /// <summary>
        /// 上传时间
        /// </summary>
        public DateTime? UploadTime { get; set; }

        /// <summary>
        /// 状态（1=有效，0=无效）
        /// </summary>
        public int Status { get; set; } = 1;

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }
}
